package com.sf.marathon.soul.core.util;


import com.sf.marathon.soul.core.base.BusinessException;

/**
 * Created by 01368146 on 2017/8/12.
 */
public class AssertUtils {

    private AssertUtils() {
    }

    /**
     * 鉴定对象是否为空，为空的情况会抛出业务异常
     *
     * @param obj
     * @param msg
     */
    public static void notNull(Object obj, String msg) {
        if (obj == null) {
            throw new BusinessException(msg);
        }
    }

    public static void notNull(Object obj) {
        notNull(obj, "传入的数据不能为空");
    }
}
